
#ifndef _GEOPOINT_LIST_H
#define _GEOPOINT_LIST_H

#include <stdlib.h>

struct _geopoint_list_node_t {
	struct _geopoint_list_node_t *next;
	struct _geopoint_list_node_t *prev;
	void *data;
};

typedef struct _geopoint_list_node_t geopoint_list_node_t;

typedef struct _geopoint_list_t {
	geopoint_list_node_t *head;
	geopoint_list_node_t *tail;
	int size;
} geopoint_list_t;

void geopoint_list_init (geopoint_list_t *list);
void geopoint_list_insert (geopoint_list_t *list, void *data);

#define list_for_each(node, list) \
    for (node = (list)->head; node != NULL; node = node->next)

#endif
